package com.baili.service.inspector;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baili.dao.inspector.InspectorDao;
import com.baili.dto.Check;
import com.baili.dto.Defect;
import com.baili.dto.ProductOrder;
import com.baili.dto.Sampling;

/** 
 * @author iceX
 * @version 创建时间：2016年3月31日 下午2:53:05 
 * @Name: InspectorServiceImpl.java
 */
@Service
public class InspectorServiceImpl implements InspectorService{

	@Autowired
	private InspectorDao inspectorDao;
	
	@Override
	public List getEventType() {
		
		return inspectorDao.getEventType();
	}

	@Override
	public void addEventType(String eventTopicId, String eventDescription ,String date,String fileName) {
		
		inspectorDao.addEventType(eventTopicId ,eventDescription ,date,fileName);
	}

	@Override
	public List getcallTypeList() {
		
		return inspectorDao.getcallTypeList();
	}

	@Override
	public List getmyFaultList(ProductOrder productOrder) {
		
		return inspectorDao.getmyFaultList(productOrder);
	}

	@Override
	public int getmyFaultCount() {
		
		return inspectorDao.getmyFaultCount();
	}

	@Override
	public List getmyFaultListByTime(String startTime, String endTime,Integer userId,String productCode,int checkProcess) {
		
		return inspectorDao.getmyFaultListByTime(startTime ,endTime,userId,productCode,checkProcess);
	}

	@Override
	public int getmyFaultCountByTime(String startTime, String endTime,Integer userId,String productCode) {
		
		return inspectorDao.getmyFaultCountByTime(startTime ,endTime,userId,productCode);
	}

	@Override
	public List getCallList() {

		return inspectorDao.getCallList();
	}

	@Override
	public int updateCheakState(Integer state, Integer id) {
		int count = inspectorDao.updateCheakState(state, id);
		return count;
	}

	@Override
	public List getFaultList() {

		return inspectorDao.getFaultList();
	}

	@Override
	public int updateFaultState(Integer state, Integer id,Integer checkId,Integer stage,Integer kzType,String processName) {
		int count = inspectorDao.updateFaultState(state, id,checkId,stage,kzType,processName);
		return count;
	}
	@Override
	public int updateFaultState(Integer state, Integer id,Integer checkId,Integer stage,Integer kzType,String processName,int type) {
		int count = inspectorDao.updateFaultState(state, id,checkId,stage,kzType,processName,type);
		return count;
	}

	@Override
	public List getFaultListForme() {

		return inspectorDao.getFaultListForme();
	}

	@Override
	public int deleteFaultList(Integer id) {
		int i=inspectorDao.deleteFaultList(id);
		return i;
	}

	@Override
	public List getProcessList() {
		
		return inspectorDao.getProcessList();
	}

	@Override
	public int insrtFaultForme(String fault,Integer state) {
		
		return inspectorDao.insrtFaultForme(fault,state);
	}
	
	@Override
	public List getproductorderListChecked(ProductOrder productOrder) {
		
		return inspectorDao.getproductorderListChecked(productOrder);
	}
	
	@Override
	public List getproductorderListCheck(ProductOrder productOrder) {
		
		return inspectorDao.getproductorderListCheck(productOrder);
	}

	@Override
	public List getproductorderListCheckedDetails(int id) {
		
		return inspectorDao.getproductorderListCheckedDetails(id);
	}
	@Override
	public List<Map<String,Object>> getCheckId(Check check) {
		
		return inspectorDao.getCheckId(check);
	}
	@Override
	public List<Map<String,Object>> getDefectList(Defect defect) {
		
		return inspectorDao.getDefectList(defect);
	}

	@Override
	public void insertDefect(Defect defect) {
		
		inspectorDao.insertDefect(defect);
		
	}

	@Override
	public void updateCheckTime(Check check) {
		
		inspectorDao.updateCheckTime(check);
		
	}
	
	@Override
	public List<Map<String,Object>> getDefectUser(Defect defect) {
		
		return inspectorDao.getDefectUser(defect);
	}
	@Override
	public List getDefectAndProcess() {
		
		return inspectorDao.getDefectAndProcess();
	}
	
	@Override
	public List insertDefectUser(Defect defect) {
		
		return inspectorDao.insertDefectUser(defect);
		
	}
	
	@Override
	public List deleteDefectUser(Defect defect) {
		
		return inspectorDao.deleteDefectUser(defect);
		
	}

	@Override
	public List<Map<String, Object>> getCallOrDefectAndPictureOrVedio(
			Integer id, Integer state, Integer type) {
		return inspectorDao.getCallOrDefectAndPictureOrVedio(id,state,type);
	}
	@Override
	public List<Map<String, Object>> getDefectAndPictureOrVedio(String fileName, Integer state, Integer type){
		return inspectorDao.getDefectAndPictureOrVedio(fileName,state,type);
	}
	
	@Override
	public Map<String,Object> updateQualifiedCount(ProductOrder productOrder){
		
		return inspectorDao.updateQualifiedCount(productOrder);
	}
	@Override
	public List getMaxCheckNumber(Check check){
		
		return inspectorDao.getMaxCheckNumber(check);
	}
	@Override
	public List<Map<String, Object>> getDefectUserLst(Defect defect){
		
		return inspectorDao.getDefectUserLst(defect);
	}

	@Override
	public void insertSampling(Sampling samplingDto) {
		inspectorDao.insertSampling(samplingDto);
	}

	@Override
	public List<Map<String, Object>> getCreateSamplingInfo() {
		return inspectorDao.getCreateSamplingInfo();
	}

	@Override
	public List<Map<String, Object>> getSamplingLst(Sampling sampling) {
		return inspectorDao.getSamplingLst(sampling);
	}

	@Override
	public List<Map<String, Object>> getSamplingDetails(Sampling sampling) {
		return inspectorDao.getSamplingDetails(sampling);
	}

	@Override
	public List<Map<String, Object>> getSamplingStatistic(Sampling sampling) {
		return inspectorDao.getSamplingStatistic(sampling);
	}

	@Override
	public void insertCheckPost(Sampling sampling) {
		inspectorDao.insertCheckPost(sampling);
	}

	@Override
	public void deleteCheckPost(Sampling sampling) {
		inspectorDao.deleteCheckPost(sampling);
	}

	@Override
	public List<Map<String, Object>> getCheckPostLst() {
		return inspectorDao.getCheckPostLst();
	}
}
